import 'package:flutter/material.dart';
import 'package:terminal_flutter_demo/font/CustomIcon.dart';

class ButtonTypePage extends StatelessWidget {
  const ButtonTypePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            ElevatedButton(
              onPressed: () {},
              child: const Text('普通按钮'),
            ),
            ElevatedButton.icon(
              onPressed: () {},
              icon: const Icon(CustomIcon.gouwuchekong),
              label: const Text('普通按钮'),
            ),
            SizedBox(
              width: 100,
              height: 100,
              child: ElevatedButton.icon(
                style: ButtonStyle(
                    backgroundColor: MaterialStateProperty.all(Colors.amber),
                    foregroundColor: MaterialStateProperty.all(Colors.red),
                    shape: MaterialStateProperty.all(RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(50)))),
                onPressed: () {},
                icon: const Icon(CustomIcon.gouwuchekong),
                label: const Text('圆形按钮'),
              ),
            )
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            TextButton(
              onPressed: () {},
              child: const Text('文本按钮'),
            ),
            TextButton.icon(
              onPressed: () {},
              icon: const Icon(Icons.search),
              label: const Text('文本按钮'),
            ),
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            OutlinedButton(
              onPressed: () {},
              child: const Text('边框按钮'),
            ),
            OutlinedButton.icon(
              onPressed: () {},
              icon: const Icon(Icons.send),
              label: const Text('边框按钮'),
            ),
          ],
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: [
            IconButton(
              onPressed: () {},
              icon: const Icon(
                CustomIcon.weixin,
                color: Colors.green,
              ),
            ),
          ],
        ),
      ],
    );
  }
}
